package com.bonc.ioc.util;

import java.util.ArrayList;
import java.util.List;


public  class BaseTreeNode {
    /**
     * 子Id
     */
    private String id;
    /**
     * 父ID
     */
    private String pId;

    private List<BaseTreeNode> child;

    public BaseTreeNode() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getpId() {
        return this.pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public List<BaseTreeNode> getChild() {
        return this.child;
    }

    public void setChild(List<BaseTreeNode> child) {
        this.child = child;
    }

    public void addChild(BaseTreeNode baseTreeNode) {
        if (this.child == null) {
            this.setChild(new ArrayList());
        }

        this.getChild().add(baseTreeNode);
    }
}
